<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>权限管理-新闻信息管理系统</title>
  <link rel="stylesheet" href="view/assets/css/bootstrap.min.css">
  <script src="view/assets/js/html5shiv.min.js"></script>
  <script src="view/assets/js/respond.min.js"></script>
</head>
<style>
  *{
    margin: 0;
    padding: 0;
  }
  .table{
    word-break:break-all; word-wrap:break-all;
    /*    表格换行   */
  }
</style>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" style="margin: auto;" href="index.php">新闻信息管理系统</a>
      <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="admin.php">首页</a>
      <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="artlist.php">文章管理</a>
      <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="catlist.php">分类管理</a>
      <a class="navbar-brand" style="margin: auto;font-size: 15px;" href="commlist.php">评论管理</a>
      <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="role.php">权限管理</a>
      <a class="navbar-brand" style="margin: auto;font-size: 15px;" href="about.php">关于</a>
    </div>
    <!--跳转后台登录按钮-->
    <div id="navbar" class="navbar-collapse collapse">
      <form class="navbar-form navbar-right">
        <a type="button" class="btn btn-success" href="logout.php">退出</a>
      </form>
    </div>
  </div>
</nav>
<!--头部-->
<div class="jumbotron text-center">
  <div style="margin: 20px;">
    <p>新闻信息管理系统</p><p>权限管理</p>
  </div>
</div>
<!--主体部分-->
<div class="alert alert-warning text-center">
  <h3>提示</h3>
  <h4>您正在添加新用户</h4>
  <form action="" method="post">
    <div class="container" style="text-align: center;">
      <div class="row">
        <div class="col-sm-6">
          <div class="input-group input-group-sm">
            <span class="input-group-addon" id="sizing-addon1">用户名</span>
            <input style="width: 100%;" type="text" id="username" name="username" class="form-control" aria-describedby="sizing-addon1" >
          </div>
          <div class="input-group input-group-sm" style="margin-top: 15px;">
            <span class="input-group-addon" id="sizing-addon1">邮箱</span>
            <input style="width: 100%;" type="text" id="mail" name="mail" class="form-control" aria-describedby="sizing-addon1">
          </div>
        </div>
        <div class="col-sm-6">
          <div class="input-group input-group-sm">
            <span class="input-group-addon" id="sizing-addon1">权限</span>
            <span>
                  <select name="role_id" id="role_id" class="input-group-addon" style="width: 100%;">
                  <?php foreach ($roles as $r) { ?>
                    <!--            渲染下拉菜单-->
                    <option value="<?php echo $r['role_id'];?>"><?php echo $r['role_name'];?></option>
                    <?php } ?>
                </select>
                </span>
          </div>
          <div class="input-group input-group-sm" style="margin-top: 15px;">
            <span class="input-group-addon" id="sizing-addon1">密码</span>
            <input style="width: 100%;" type="password" id="password" name="password" class="form-control" aria-describedby="sizing-addon1">
          </div>
        </div>
        <button type="submit" style="margin-top: 10px;" class="btn btn-info">提交</button>
      </div>
    </div>
  </form>
</div>


<!--页尾-->
<div class="jumbotron text-center" style="margin-bottom:0">
  <p>Copyright © 2020-2021 用于数据库实践</p>
</div>
<script src="view/assets/js/jquery.min.js"></script>
<script src="view/assets/js/bootstrap.min.js"></script>
</body>
</html>
